<template>
  <div>
    <el-card>
      <!-- 搜索头部 -->
      <div slot="header" class="header">
        <div class="search-header">
          <span>线上热门搜索</span>
          <el-dropdown>
            <span class="el-dropdown-link">
              <i class="iconfont icon-more1"></i>
            </span>
            <el-dropdown-menu slot="dropdown">
              <el-dropdown-item
                v-for="(item, index) in storesInfo"
                :key="item.id"
                >{{ item.storesName }}</el-dropdown-item
              >
            </el-dropdown-menu>
          </el-dropdown>
        </div>
      </div>
      <!-- 图 -->
      <el-row :gutter="10">
        <el-col :span="12">
          <LineCharts></LineCharts>
        </el-col>
        <el-col :span="12">
          <LineCharts></LineCharts>
        </el-col>
      </el-row>
      <!-- 表格 -->
      <el-table :data="tableData" style="width: 100%; margin: 10px 0;" border>
       <el-table-column label="排名" width="80" type="index"></el-table-column>
        <el-table-column label="搜搜关键字" width="180"> </el-table-column>
        <el-table-column label="用户数" sortable> </el-table-column>
        <el-table-column label="周涨幅" sortable> </el-table-column>
      </el-table>
      <!-- 分页器 -->
      <el-pagination layout="prev, pager, next" :total="1000" class="pagination"> </el-pagination>
    </el-card>
  </div>
</template>

<script>
import LineCharts from "./LineCharts";
export default {
  name: "Search",
  components: {
    LineCharts,
  },
  data() {
    return {
      storesInfo: [
        {
          id: 1,
          storesName: "肯德基",
          storesAddress: "广州科学城店",
          rindex: "rindex",
        },
        {
          id: 2,
          storesName: "麦当劳",
          storesAddress: "广州智慧城店",
          rindex: "rindex",
        },
        {
          id: 3,
          storesName: "星巴克",
          storesAddress: "广州神州路店",
          rindex: "rindex",
        },
        { id: 4, storesName: "奈雪的茶", storesAddress: "广州北京路店" },
        { id: 5, storesName: "沪上阿姨", storesAddress: "广州体育西路店" },
        { id: 6, storesName: "丘大叔", storesAddress: "广州珠江新城店" },
        { id: 7, storesName: "茶百道", storesAddress: "广州小蛮腰店" },
      ],
      tableData: [{}],
    };
  },
};
</script>

<style scoped>
.header {
  border-bottom: 1px solid #eee;
  padding: 5px 0px;
}
.search-header {
  display: flex;
  justify-content: space-between;
  margin-bottom: 5px;
}
.pagination {
  float: right;
}
div >>> .el-card__header {
  border-bottom: none;
}
</style>